﻿@{
    ViewBag.Title = "PrimaryObjectProperty";
    Layout = "~/Views/Shared/_Page.cshtml";
}

<script type="text/javascript">
    
    window.onload = function() {
        /*
            prototype
        */
        var p = { x: 1, y: 2 };
        var o = Object.create(p);
        ZEUS.DEBUG.log("1. ** Object Prototype **");
        ZEUS.DEBUG.log("p is prototype of o: " + p.isPrototypeOf(o));
        ZEUS.DEBUG.log("Object.prototype is prototype of o: " + Object.prototype.isPrototypeOf(o));

        ZEUS.DEBUG.log("<br />");

        /*
            class attribute 
         */
        ZEUS.DEBUG.log("2. ** Class Attribute **");

        var book = {
            "title": "Javascript Definitive Guide",
            "publish date": "2009-05-08",
            author: {
                firstname: "David",
                lastname: "Flanagan"
            }
        };

        function f() { };

        ZEUS.DEBUG.log("class attribute of null: " + ObjUtil.getClass(null));
        ZEUS.DEBUG.log("class attribute of 123: " + ObjUtil.getClass(123));
        ZEUS.DEBUG.log("class attribute of '': " + ObjUtil.getClass(""));
        ZEUS.DEBUG.log("class attribute of false: " + ObjUtil.getClass(false));
        ZEUS.DEBUG.log("class attribute of {}: " + ObjUtil.getClass({}));
        ZEUS.DEBUG.log("class attribute of book: " + ObjUtil.getClass(book));
        ZEUS.DEBUG.log("class attribute of []: " + ObjUtil.getClass([]));
        ZEUS.DEBUG.log("class attribute of /w/: " + ObjUtil.getClass(/w/));
        ZEUS.DEBUG.log("class attribute of new Date(): " + ObjUtil.getClass(new Date()));
        ZEUS.DEBUG.log("class attribute of window: " + ObjUtil.getClass(window));
        ZEUS.DEBUG.log("class attribute of new f(): " + ObjUtil.getClass(new f()));

        ZEUS.DEBUG.log("<br />");
    }

</script>

<h2>Primary Object Property</h2>
<br />
<h3>Path: @ViewBag.Path</h3>
<br />
<h3>Extended JS: /JsLib/G_Core.js</h3>
<br />
<h3>See the result on console</h3>
<br />

